<%-- 
    Document   : index
    Created on : 03-jul-2012, 18:29:48
    Author     : Administrador
--%>
<%@page import="java.util.Calendar"%>
<%@page import="com.javabeans.Carrera"%>
<%@page import="java.util.List"%>
<% 
    String s_path = request.getContextPath(); 
    String msg = "";
    if(request.getParameter("msg") !=null){
        msg = request.getParameter("msg");
    }
    session = request.getSession(true);
    session.removeAttribute("qaptcha_key");
    
    Calendar s_now = Calendar.getInstance();
    String s_param = s_now.get(Calendar.YEAR)+","+s_now.get(Calendar.MONTH)+","+s_now.get(Calendar.DAY_OF_MONTH)+","+s_now.get(Calendar.HOUR_OF_DAY)+","+s_now.get(Calendar.MINUTE)+","+s_now.get(Calendar.SECOND)+","+s_now.get(Calendar.MILLISECOND);
    List<Carrera> carreras = (List<Carrera>)request.getAttribute("carreras");
%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>SI-ESFM</title>
        <meta name="description" content="Derechos Reservados SI-ESFM" />
        <link rel="stylesheet" href="<%=s_path%>/css/styles.css" type="text/css" />
        <link rel="stylesheet" href="<%=s_path%>/css/menu/style.css" type="text/css" />
        <link rel="shortcut icon" href="<%=s_path%>/images/ico.png" type="image/png"/>
        <link rel="stylesheet" href="<%=s_path%>/css/qaptcha/QapTcha.jquery.css" type="text/css" />
        <script type="text/javascript" src="<%=s_path%>/js/md5.js"></script>
        <script type="text/javascript" src="<%=s_path%>/js/comun.js"></script>
        <script type="text/javascript" src="<%=s_path%>/js/jquery-1.7.2.min.js"></script>
        <script type="text/javascript" src="<%=s_path%>/js/validate/jquery.validate.min.js"></script>
        <script type="text/javascript">
            $(document).ready(function(){
                $("#formCarrera").validate();
            });
            
            // para mostrar los menus dependiendo d q opcion fue clikado
            function menu(op){
                switch(parseInt(op,10)){
                    case 1:
                        location.href='<%=s_path%>/';
                        break;
                    case 2:
                        location.href='<%=s_path%>/web/index.jsp?tipo=2';
                        break;
                    case 3:
                        location.href='<%=s_path%>/web/index.jsp?tipo=3';
                        break;
                    case 4:
                        location.href='<%=s_path%>/web/index.jsp?tipo=4';
                        break;  
                    case 5:
                        location.href="<%=s_path%>/Foros?accion=1";
                        break;
                }
            }
        </script>
    </head>
    <body onload="showTime(<%=s_param%>)">
        <div id="top-wrap">            
            <!-- cabeza principal -->
            <div id="header-wrap">
                <div id="header">
                    <h1><a href="index.html"><img src="<%=s_path%>/images/logo.png" alt="logo" height="46" width="190"></a></h1><!-- logo here -->
                    <div style="float: left;height:40px;position:relative; top:27px;">
                        <ul id="css3menu_top" class="topmenu">			
                            <li class="topfirst"><a href="javascript:menu(1)" title="Principal"><img src="<%=s_path%>/css/menu/home.png" alt="home.png"/>Principal</a></li>
                            <li class="topmenu"> <a href="javascript:menu(2)" title="Administrativos"><img src="<%=s_path%>/css/menu/admin.png" alt="admin.png"/>Administrativos</a></li>
                            <li class="topmenu"> <a href="javascript:menu(3)" title="Docentes"><img src="<%=s_path%>/css/menu/docente.png" alt="docente.png"/>Docentes</a></li>
                            <li class="topmenu"> <a href="javascript:menu(4)" title="Estudiantes"><span><img src="<%=s_path%>/css/menu/estudiante.png" alt="Demos"/>Estudiantes</span></a></li>
                            <li class="topmenu"> <a href="javascript:menu(5)" title="Comunidad"><img src="<%=s_path%>/css/menu/postulantes.png" alt="postulante.png"/>Foros</a></li>
                            <li class="toplast"> <a href="#" title="Ayuda"><img src="<%=s_path%>/css/menu/information.png" alt="ayuda"/>Ayuda</a></li>
                        </ul>
                        <p style="display:none"><a href="#">CAR Drop Down CSS Menu Css3Menu.com</a></p><!-- CAR no aparece -->
                        <!--end of navigation-->
                    </div>
                </div>
            </div><!--header ends here-->
            
            <!-- cuerpo -->
            <div id="bodySpace">               
                <!-- aqui va la ruta -->
                <div class="clearfix" id="middle" style="position: absolute">
                    <!-- aqui va el arbol de entrada -->
                    <div id="breadcrumb"><!-- le da la forma de la imagen -->
                        <ul>
                            <li><a href="<%=s_path%>/">Home</a></li>
                            <li><span style="color:#666">Foros</span></li>
                            <li class="current-page"><span class="end"><span class="middle">&nbsp;</span></span></li>
                        </ul>                      
                    </div><!-- begin SIDEBAR FIRST -->
                </div>
                
                <div id="principal">
                    
                     <!-- izquierda -->
                    <div class="cuerpo2y" style="border: 0px solid"><br/><br/><!-- estos break son necesarios ya q uso absolute en css  cuerpo izquierdo-->
                        <div class="izq">
                           <div id="menuprin">
                                <div class="menuIzqMarco">
                                    <div class="menu_css">
                                        <h3 class="title">Seleccione</h3>
                                        <div class="menu_selected menu_selectedDepen">
                                            <ul class="menuLogoNone">
                                                <li class = ""><span><a href="Foros?accion=16">Admin. Foro</a></span><span class="end"></span></li>                                               
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                           </div> 
                        </div>
                        <div class="medio" style="border: 0px solid">
                            <div style="clear:both;">
                                <label class="form_align46"><h2 style="color:#004080;text-align: center; margin:3px 0px 3px 0px;">Bienvenidos al foro de la comunidad!!!</h2></label>
                            </div>
                            <form id="formCarrera" method="post" action="Foros">
                                <input type="hidden" name="accion" value="2"/>
                                <div style="clear:both;"><br/>
                                    <label for="mycarrera" class="form_align20">Carrera :</label>
                                    <select name="carrera" id="carrera" class="form_input_align required" title="Seleccione la especialidad." >
                                        <option value="">Seleccione</option>
                                        <%
                                            for(Carrera c : carreras)
                                                out.println("   <option value='"+c.getIdCarrera()+"' >"+c.getFacultad().getNombre()+", "+c.getNombre()+"</option>");
                                        %>
                                    </select>
                                    <label class="error">*</label>
                                </div>
                                <div style="clear: both">
                                    <label class="form_align20">&nbsp;</label>
                                    <table border="0" style="float: left">
                                        <tr>
                                            <td style="text-align:right"><br/><input type="submit" value="Mostrar" class="boton" title="Pulsa aqu&iacute; para mostrar" />&nbsp;&nbsp;</td>
                                            <td><br/>&nbsp;&nbsp;<input type="button" value="Cancelar" onclick="history.back()" class="boton" title="Pulsa aqu&iacute; para cancelar"/></td>
                                        </tr>
                                    </table>
                                </div>                                
                            </form>
                        </div>
                    </div><!--end of leftPan-->
                    
                    <div class="yDer" style="border: 1px solid #ccc;">
                        <div style="clear:left;width: 100%;height: 25%;">
                            <center><span id="fechaServ" style="font-size:11px;"></span><br/><span id="horaServ" style=""></span></center>
                            <center><label><b><br/>SISTEM DE INFORMACI&Oacute;N</b></label></center>
                            <center><label><b><h2><i>SI-ESFM</i></h2></b></label></center>
                            <center><br/><label><b>Comunidad : Foros</b></label></center><br/>
                        </div>
                        <div style="clear:left;height: 25%;"><br/><br/><br/><br/><img width="100%" src="/siss/images/foro/redes_sociales.png" alt="flotaSanMiguel.png"/><br/><br/></div>
                        <div style="clear:left;height: 25%;"><center><br/><br/><img width="100%" src="/siss/images/foro/foroPublicidad.png" alt="carnaval.png"/><br/><br/></center></div>
                        <div style="clear:left;height: 25%;"><img width="100%" src="/siss/images/publicidad/publicidadUltra.png" alt="flotaSanMiguel.png"/></div>
                        <br/>
                    </div><!--end of rightPan-->
                    
                </div><!--end of content-wrapper-->
            </div><!--end of body-wrap-->
            
            <!-- footer -->
            <%//@include file="../../footer.jsp" %>
        </div>
    </body>
</html>
